#ifndef MODEL_HPP_INCLUDED
#define MODEL_HPP_INCLUDED

#include "image.h"
#include <vector>
#include <fstream>

using std::vector;

class Model
{
public:
	Model();
	~Model(){fout.close();};

	void Get(const I_Rect &_selection);
	void Get(const std::vector<I_Rect> &_selections);
	void Get(const I_Point &_point);
	void Get(const Image &_image);
	string GetInfo();
	Image& Result();
	void OutputBoxes();
	void AddFrame();
	void PreFrame();

	Image src_img;
	vector<I_Rect> boxes;

protected:
	std::ofstream fout;

	Image rst_img;
	vector<vector<I_Rect> > t_boxes;
	//vector<I_Rect> boxes;
	int ObjectFlag;
	I_Rect box;
	I_Point point;

	bool GetImageFlag;

	int m_count;
	//int64 m_time;
	//double m_fps;
};

#endif // MODEL_HPP_INCLUDED
